
from selenium import webdriver
from selenium.webdriver.common.by import By

browser = webdriver.Firefox()
url = 'https://www.baidu.com'
browser.get(url)

# 元素定位 Element localization
# input 百度一下按钮 id="su"

# btn = browser.find_elements(By.ID,'su')

# btn = browser.find_elements(By.XPATH,'//input[@id="su"]')

btn = browser.find_elements(By.CSS_SELECTOR,'#su')

print(btn)
